import prompt from '@system.prompt';
import router from '@system.router';

export default {
    onInit() {


    },


    data: {
        course: [
            {
                red_packet_3_t1: '新人登录七天礼',
                red_packet_3_t2: '最高可提999金币',
                red_packet_3_t3: '07.21-07.29可领，每天最高可领999金币',
                red_packet_3_t4: '领红包',
                red_packet_img1: '/common/images/22.jpg'
            },
            {
                red_packet_3_t1: '阅读赚金币',
                red_packet_3_t2: '最高3040金币',
                red_packet_3_t3: '每日阅读可获得大量金币，会员奖励翻倍',
                red_packet_3_t4: '去阅读',
                red_packet_img1: '/common/images/33.jpg'
            },
            {
                red_packet_3_t1: '听书赚金币',
                red_packet_3_t2: '最高6666金币',
                red_packet_3_t3: '听书可获得大量金币，看小视频金币翻倍',
                red_packet_3_t4: '去听书',
                red_packet_img1: '/common/images/44.jpg'
            }
        ],
        daily: [
            {
                daily_t1: '幸运6抽奖', daily_t2: '海量奖品', daily_t3: '天天抽好礼，19：00可额外抽幸运符兑大奖', daily_t4: '去抽奖'
            },
            {
                daily_t1: '幸运大转盘', daily_t2: '海量金币', daily_t3: '拼手气，抽大奖，最高可得10金币', daily_t4: '去抽奖'
            },
            {
                daily_t1: '浏览小故事赚n金币', daily_t2: '+50金币', daily_t3: '进书友圈，浏览小视频60秒，得丰厚金币奖励', daily_t4: '去完成'
            },
            {
                daily_t1: '逛街赚金币', daily_t2: '+100金币', daily_t3: '滑动浏览30-60秒，赚大量金币0/5次', daily_t4: '去逛逛'
            },
            {
                daily_t1: '看小视频赚金币', daily_t2: '+150金币', daily_t3: '观看小视频，得丰富金币奖励', daily_t4: '去观看'
            },
            {
                daily_t1: '看小视频免广告', daily_t2: '', daily_t3: '观看小视频，立享15分钟无广告阅读', daily_t4: '免广告'
            },
            {
                daily_t1: '玩小游戏赚金币', daily_t2: '+150金币', daily_t3: '免下载，创建游戏角色试玩120秒，赚大量金币', daily_t4: '玩游戏'
            }

        ]
    },
    clickGetMoney() {
        router.push({
            uri: 'pages/welfare_new_page/welfare_new_page'
        })
    },

    clickRead(i) {
        if (i == 0) {


        }
        else if (i == 1) {
            router.push({
                uri: 'pages/bookshelf_page/bookshelf_page'
            })
        } else if (i == 2) {
            router.push({
                uri: 'pages/bookstore_page/bookstore_page'
            })

        }
    },
    clicklisten(i){
        if (i == 4) {
            prompt.showToast({
                message:'11111'
            })
            router.push({
                uri:'pages/welfare_video_page/welfare_video_page'
            });
        }
    },
    refresh: function (e) {
        prompt.showToast({
            message: '刷新中...'
        })
        var that = this;
        that.fresh = e.refreshing;
        setTimeout(function () {
            that.fresh = false;
            //            that.courses1 = that.backupCourses;
            prompt.showToast({
                message: '刷新完成！'
            })
        }, 2000)
    }
}
